<?php
namespace app\serverfund\validate;
use \app\manage\validate\BaseValidate;
/**
 * @author:      李颖
 * @DateTime:    2017-12-15 16:03:32
 * @Description: 有关订单操作的验证
 */
class Order extends BaseValidate
{

    protected $rule =   [
        'id' => ['integer', 'gt'=>0],
        'user_id' => ['integer', 'gt'=>0],
        'integral_deduction' => ['integer', 'egt'=>0],
        'integral_deduction_money' => ['integer', 'egt'=>0],
        'integral_deduction_currency' => ['number', 'egt'=>0],
        'pay_method' => ['in'=>'cash,currency,alipay,wechat,unionpay'],
    ];

    protected $message  =   [
        
    ];

    protected $scene = [
    	'checkOrderPrice' => [
            'final_price' => ['require','integer', 'gt'=>0],
            'final_currency_price' => ['require','number', 'gt'=>0],
            'order_number' => ['require','integer', 'gt'=>0],
        ]
    ];
}
